syntax-check: add syntactic rule to prohibit gs_unref_*
authorGiuseppe Scrivano <gscrivan@redhat.com>
Tue, 12 May 2015 07:39:13 +0000 (09:39 +0200)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Wed, 13 May 2015 08:02:47 +0000 (10:02 +0200)
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
maint.mk

index ff5400fe8d071d4a0751efb87cff9b2dfc4c0b31..9b77357075df322f96b4eddd047ece847e6c1be2 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -1032,6 +1032,11 @@ sc_const_long_option:
        halt='add "const" to the above declarations'                    \
          $(_sc_search_regexp)
 
+sc_prohibit_gs_unref:
+       @prohibit='\bgs_unref_(keyfile|variant*|ptrarray|hashtable|bytes|object)\b' \
+       halt="do not use gs_unref_*; use g_autoptr instead"             \
+         $(_sc_search_regexp)
+
 NEWS_hash =                                                            \
   $$($(SED) -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p'          \
        $(srcdir)/NEWS                                                  \